package com.wu.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.wu.dao.DataBakDao;
import com.wu.pojo.dto.DataBakDTO;
import com.wu.pojo.po.orgPo.DataBak;
import com.wu.service.DataBakService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class DataBakServiceImpl implements DataBakService {

    @Autowired
    private DataBakDao dataBakDao;


    @Override
    public List<DataBakDTO> queryList() {
        return dataBakDao.queryList();
    }


    @Override
    public DataBak query(DataBak dataBak) {
        return dataBakDao.query(dataBak);
    }

    @Transactional
    @Override
    public boolean insert(DataBak dataBak) {
        return dataBakDao.insert(dataBak);
    }

    @Transactional
    @Override
    public boolean update(DataBak dataBak) {
        return dataBakDao.update(dataBak);
    }


    @Override
    public DataBakDTO queryByOrgId(String orgId) {
        return dataBakDao.queryByOrgId(orgId);
    }
}
